package com.dkd.flow.emums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
public enum FlowType implements IEnum<Integer> {
    /**
     * 101     ->      转正   |   102     ->      离职   |   103     ->      调岗
     * 201     ->      加班   |   202     ->      请假   |   203     ->      调休    |  204     ->      出差  |  205     ->      补卡
     * 301     ->      报销   |   302     ->      企业报销   |   303     ->     付款
     * 401     ->      采购合同   |   402     ->      采购需求
     * 501	   ->      资产入库
     * 401     ->      采购合同   |   402     ->      采购需求
     * 501	   ->      资产入库   |   502     ->      资产领用  |   503     ->      资产维修	|	504		->		资产转移
     * 505     ->	   资产归还	  |   506	  -> 	  资产报废
     * 10000   ->      其他
     */
    REGULAR(101,
            "转正"), LEAVE_OFFICE(102,
            "离职"), JOB_TRANSFER(103,
            "调岗"), JOB_TRANSFER_BORROW(104,
            "借调"), OVERTIME(201,
            "加班"), ASK_FOR_LEAVE(202,
            "请假"), COMPENSATORY_LEAVE(203,
            "调休"), TRAVEL(204,
            "出差"), WORK_ATTENDANCE_CARD(205,
            "补卡"), RESUMPTION_LEAVE(206,
            "销假"), DIFFERENCE_ADJUST(207,
            "差异调整"), OVERTIME_BATCH(208,
            "批量加班"), DIFFERENCE_ADJUST_BATCH(209,
            "批量差异调整"), PUBLIC_WORK(210,
            "公干"), CARD_OF_GO_OUT(211,
            "外出补卡"), EFFECTIVE_ATTENDANCE_BATCH(212,
            "批量导入有效出勤"), BREASTFEEDING_LEAVE(213,
            "哺乳假"), DAILY_WORK_APPROVAL(214,
            "日报审批"), EXPENSE(301,
            "报销"), ENTERPRISE_EXPENSE(302,
            "企业报销"), PAYMENT(303,
            "付款"), THIRD_PAYMENT(304,
            "第三方付款"), BUDGET(305,
            "预算"), PLANE_TICKET(306,
            "机票"), SEVERANCE_COMPENSATION(307,
            "离职补偿"), CROSS_COMPANY_APPROPRIATION(308,
            "跨公司拨款"), FAMILY_VISIT(309,
            "探亲申请"), CHANGE_VISIT_INFO(310,
            "探亲信息变更"), INVOICING_PROCESS(320,
            "开票申请"), REQ_APPROVAL(401,
            "采购需求"), PCHASE_CONTRACT(402,
            "采购合同"), INDEPENDENT_PCHASE_CONTRACT(403,
            "单独采购合同"), // SALES_CONTRACT(404, "销售合同审批"),
    SUPPLIER_APPLICATION(405,
            "新增供应商申请"), APPLICATION_FOR_SEAL_AND_LICENSE(406,
            "印章及证照申请"), SALES_SEAL_AND_LICENSE_APPLICATION(407,
            "销售印章及证照申请"), ASSET_STORAGE(501,
            "资产入库"), ASSET_RECEIVE(502,
            "资产领用"), ASSET_MAINTAIN(503,
            "资产维修"), ASSET_TRANSFER(504,
            "资产转移"), ASSET_GIVE_BACK(505,
            "资产归还"), ASSET_SCRAP(506,
            "资产报废"), YI_YAN_PERFORMANCE(601,
            "易研绩效"), MONTHLY_PERFORMANCE_APPLICATION(602,
            "月度绩效奖金申请表"), APPLICATION_FOR_GRADE_ADJUSTMEN(603,
            "调级申请表"), PO_APPROVAL(701,
            "po审批"), PO_CHANGE_APPROVAL(702,
            "po变更"), SALES_CONTRACT(703,
            "销售合同审批"), CHANNEL_CONTRACT(704,
            "渠道伙伴合作协议"), PROJECT_RECEIPT(705,
            "项目验收单"), ADMISSION_NOTICE_FORM(706,
            "产品项目入场通知单"), RECOMMEND(1011,
            "内部推荐及奖金申请"), SALARY_INCREASE_FOR_SUPPORT_SYS(1012,
            "支撑体系加薪申请表"), SALARY_INCREASE_FOR_BUSINESS_SYS(1013,
            "业务体系加薪申请表"), SALARY_INCREASE_APPLICATION(1014,
            "临时加薪申请表"), OTHER(10000,
            "其他");
    @EnumValue
    private final Integer value;
    private final String name;
    FlowType(Integer value, String name) {
        this.value = value;
        this.name = name;
    }
    @Override
    @JsonValue
    public Integer getValue() {
        return value;
    }
    public String getName() {
        return name;
    }
    public static FlowType getFlowTypeByName(String name) {
        for (FlowType flowType : FlowType.values()) {
            if (flowType.getName().equals(name)) {
                return flowType;
            }
        }
        return null;
    }
}
